- decoder
IHipAudioDecoder decoder;
Undocumented in source.
- dataToDecode
ubyte[] dataToDecode;
Unused for non streamed. It is the binary loaded from a file which will be decoded
- outBuffer
ubyte[] outBuffer;
Unused for non streamed. Where the user will get its audio decoded.
- chunkSize
uint chunkSize;
- hint
HipAudioClipHint hint;
Undocumented in source.
- totalDecoded
size_t totalDecoded;
Undocumented in source.
- type
HipAudioType type;
Undocumented in source.
- encoding
HipAudioEncoding encoding;
Undocumented in source.
- isStreamed
bool isStreamed;
Undocumented in source.
- fileName
string fileName;
Undocumented in source.
- onUpdateStream
void onUpdateStream(ubyte[] data, uint decodedSize)
Event method called when the stream is updated
- createBuffer
HipAudioBufferWrapper createBuffer(ubyte[] data)
Always alocates a pointer to the buffer data. So, after getting its content. Send it to the
recyclable buffers
- destroyBuffer
void destroyBuffer(HipAudioBuffer* buffer)
Undocumented in source.
- setBufferData
void setBufferData(HipAudioBuffer* buffer, ubyte[] data, uint size)
The buffer is actually any kind of external API buffer, it is the buffer contained in
HipAudioBufferWrapper.
- getHint
immutable(HipAudioClipHint)* getHint()
Undocumented in source. Be warned that the author may not have intended to support it.
- loadFromMemory
bool loadFromMemory(ubyte[] data, HipAudioEncoding encoding, HipAudioType type, void delegate(in ubyte[]) onSuccess, void delegate() onFailure)
Should implement the specific loading here
- updateStream
uint updateStream()
Decodes a bit more of the current buffer
- findBuffer
HipAudioBufferWrapper* findBuffer(HipAudioBuffer buf)
Undocumented in source. Be warned that the author may not have intended to support it.
- pollFreeBuffer
HipAudioBuffer pollFreeBuffer()
Attempts to get a buffer from the buffer recycler.
Used for when loadStreamed must set a buffer available
- getBuffer
HipAudioBuffer getBuffer(ubyte[] data, uint size)
Undocumented in source. Be warned that the author may not have intended to support it.
- _getBufferAPI
HipAudioBufferAPI* _getBufferAPI(ubyte[] data, uint size)
Undocumented in source. Be warned that the author may not have intended to support it.
- getAudioClipBackend
IHipAudioClip getAudioClipBackend()
Undocumented in source. Be warned that the author may not have intended to support it.
- setBufferAvailable
void setBufferAvailable(HipAudioBuffer buffer)
Undocumented in source. Be warned that the author may not have intended to support it.
- loadStreamed
uint loadStreamed(ubyte[] data, HipAudioEncoding encoding)
Saves which data should be decoded and do 1 decoding frame
- getClipData
ubyte[] getClipData()
Returns the streambuffer if streamed, else, returns entire sound
- getClipSize
size_t getClipSize()
Returns how much has been decoded
- getDuration
float getDuration()
Undocumented in source. Be warned that the author may not have intended to support it.
- getSampleRate
uint getSampleRate()
Undocumented in source. Be warned that the author may not have intended to support it.
- getDecodedDuration
float getDecodedDuration()
Undocumented in source. Be warned that the author may not have intended to support it.
- unload
void unload()
Undocumented in source. Be warned that the author may not have intended to support it.
This class is extremely linked/dependent on HipWebAudioDecoder. It was done that way because WebAudio don't let the data be put inside a buffer. See the function WasmDecodeAudio on webaudio.js